CreateStroke
Creates a stroke adding shadows to the element.
Syntax
expression.CreateStroke(width, fill);
expression
- A variable that represents a Api class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
width | Required | EMU | The width of the shadow measured in English measure units. | |
fill | Required | ApiFill | The fill type used to create the shadow. |
Returns
Example
This example shows how to crate a stroke.
let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
let fill = Api.CreateSolidFill(Api.CreateRGBColor(51, 51, 51));
let stroke = Api.CreateStroke(5 * 36000, Api.CreateSolidFill(Api.CreateRGBColor(255, 111, 61)));
let shape = Api.CreateShape("roundRect", 5930900, 395605, fill, stroke);
paragraph.AddDrawing(shape);